﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm2-8.aspx.cs" Inherits="Example.WebForm2_8" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <title></title>
</head>
<body>
  <form id="form1" runat="server">
    <div>
      必需项验证示例<hr />
      用户名：<asp:TextBox ID="txtUName" runat="server"></asp:TextBox>
      <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ForeColor="Red"
        ControlToValidate="txtUName" ErrorMessage="（用户名不能为空）" Font-Size="Small">
      </asp:RequiredFieldValidator><br />
      <asp:Button ID="btnCmf" runat="server" Text="确定" />
    </div>
  </form>
</body>
</html>
